/*
 * Copyright 2021 Shulie Technology, Co.Ltd
 * Email: shulie@shulie.io
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.pamirs.tro.entity.dao.linkguard;

import java.util.List;

import com.pamirs.tro.entity.annocation.DataAuth;
import com.pamirs.tro.entity.domain.entity.LinkGuardEntity;
import com.pamirs.tro.entity.domain.query.LinkGuardQueryParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @Author: 慕白
 * @Date: 2020-03-05 10:16
 * @Description:
 */

@Mapper
public interface TLinkGuardMapper {

    long insertSelective(LinkGuardEntity guardEntity);

    void update(LinkGuardEntity guardEntity);

    @DataAuth
    List<LinkGuardEntity> selectByExample(@Param("param") LinkGuardQueryParam param);

    Long selectCountByExample(@Param("param") LinkGuardQueryParam param);

    void deleteById(Long id);

    Long countGuardNum();

    LinkGuardEntity selectById(Long id);

    List<LinkGuardEntity> getAllEnabledGuard(@Param("applicationId") String applicationId);
}
